package com.example.shop.merchant.dao;

import com.example.shop.common.dto.Avatar;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface MerchantAvatarDao {

    @Results(id = "MerchantAvatarResultMap",value = {
            @Result(column = "merchant_id",property = "id"),
            @Result(column = "merchant_avatar",property = "avatar"),
    })
    @Select("select merchant_id,merchant_avatar from merchant where merchant_id = #{merchantId}")
    Avatar selectByUserId(Long merchantId);
}
